package com.ithuangyl.home;

import android.util.Log;

import com.ithuangyl.common.mvp.base.BaseMvpPresenter;
import com.ithuangyl.common.net.RestClient;
import com.ithuangyl.common.net.callback.ISuccess;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 *    author : itHuang
 *    e-mail : ithuangyl@163.com
 *    date   : 2020/7/18 13:06
 */
public class TestListPresenter extends BaseMvpPresenter<TestListView> {

    public void getList(int pageIndex){
        RestClient.builder()
                .url("appversion/0/getByType")
                .param("pageIndex",pageIndex)
                .clazz(VersionInfo.class)
                .success((ISuccess<VersionInfo>) info -> {
                    getView().getViewSuccess(info);
                })
                .failure((code, message) -> {
                    getView().getViewFailure(code, message);
                })
                .build()
                .get();
    }
}
